home *** CD-ROM | disk | FTP | other *** search
/ Suzy B Software 2 / Suzy B Software CD-ROM 2 (1994).iso / modems / mod_a2l / delphbts / delphi.bts < prev   
Encoding:
Text File  |  1995-05-02  |  2.0 KB  |  58 lines

  1. //DELPHI.BTS for logging on to Delphi via Tymnet (20/20 plan).
  2. //Written by Bob Morrow (RMORROW) on Oct 7, 1991.  Freeware.  Use,
  3. //modify (PLEASE!), give it away, etc. as you wish.  This assumes
  4. //you have Delphi set up to send you straight to the ST sig.  I'm
  5. //just a very limited programmer; I can't yet figure out how to
  6. //write a (successful :) script that can read your mail (if any)
  7. //and then go back to the ST area.  Modifications encouraged, but
  8. //please upload it so I can read your work and learn from it!
  9. //This isn't much more than a 20-line autologon sequence, but it's
  10. //a start.
  11.  
  12. function main()
  13.  
  14. //I have to give Tymnet a second or two to wake up here.  Hence:
  15.  
  16.   wait(35);
  17.  
  18. //(35) being 35 tenths of a second, or 3.5 seconds.  Ok, let's
  19. //continue.  BTW, 0 is infinite wait.
  20.  
  21.     port_puts("\r");
  22.     wait_for("terminal identifier",0);
  23.     port_puts("a");
  24.     wait_for("please log in:",0);
  25.     port_puts("d-      \r");
  26.     wait_for("Password:",0);
  27.     port_puts("        \r");
  28.  
  29. //At this point, you should be going to the ST sig.  Skip through
  30. //all the announcements by typing n at the More? prompt.
  31.  
  32.     wait_for("More?",0);
  33.     port_puts("n\r");
  34.     wait_for("want to do?",0);
  35.  
  36. //Let's say you want to go to the Recent Arrivals section of the
  37. //database.
  38.  
  39.     port_puts("da re\r");
  40.     wait_for("Read, Set, Exit)",0);
  41.     port_puts("r\r");
  42.  
  43. //Let's just look at them, not List or Download them.  We'll look
  44. //at 3 total. 
  45.  
  46.     wait_for("Xm, List",0);
  47.     port_puts("n\r");
  48.     wait_for("Xm, List",0);
  49.     port_puts("n\r");
  50. endfunction
  51.  
  52. //You're on your own from here.  I'd write a script that allows
  53. //for such variables as "You have a Forum message" or "You have X
  54. //Letters waiting" (i.e. to read them if there, if not, skip to next
  55. //function) but I can't seem to figure out how to deal with variables
  56. //like that that the host system puts in.  Any help or rewrites
  57. //would be most welcome.
  58.